<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template header}
<div id="app">
    {template nav}
       	<div data-v-1f84d09f="" class="main" s="[object Object]">
       		<form action="{U('member/register')}" method="post" id="registerForm">
       			<input type="hidden" name="operation" value="reg"/>
            	<table data-v-1f84d09f="">
             		<tbody data-v-1f84d09f="">
              			<tr data-v-1f84d09f="">
               				<td data-v-1f84d09f="">邀请码</td> 
               				<td data-v-1f84d09f="" colspan="2" style="position: relative;"><input data-v-1f84d09f="" regmsg="您输入的邀请码错误" tag="邀请码" type="tel" placeholder="请输入8位数字邀请码" class="va75" id="invitationcode" name="invitation" required="" style="position: relative; z-index: 1; background: rgba(0, 0, 0, 0);" /> <em data-v-ba6aa3ca="" class="clearInput" data-v-1f84d09f="" style="display: none;"></em></td>
              			</tr> 
                      	<tr data-v-1f84d09f="">
                       		<td data-v-1f84d09f="">账号</td> 
                       		<td data-v-1f84d09f="" colspan="2" style="position: relative;"><input data-v-1f84d09f="" type="url" tag="帐号" regmsg="账号应为4-16个字符，可使用字母、数字" maxlength="16" placeholder="请输入您要注册的账号" class="va75" id="username" name="username" required="" style="position: relative; z-index: 1; background: rgba(0, 0, 0, 0);" /> <em data-v-ba6aa3ca="" class="clearInput" data-v-1f84d09f="" style="display: none;"></em></td>
                      	</tr> 
                      	<tr data-v-1f84d09f="">
                           	<td data-v-1f84d09f="">设置密码</td> 
                           	<td data-v-1f84d09f="" colspan="2" style="position: relative;"><input data-v-1f84d09f="" type="password" maxlength="16" tag="设置密码" placeholder="请输入您要设置的密码" class="va75" id="password" name="password" required="" style="position: relative; z-index: 1; background: rgba(0, 0, 0, 0);" /> <span data-v-10a78dd2="" class="iconfont eye open" data-v-1f84d09f=""></span> <em data-v-ba6aa3ca="" class="clearInput" data-v-1f84d09f="" style="display: none;"></em></td>
                      	</tr> 
                      	<tr data-v-1f84d09f="">
                           	<td data-v-1f84d09f="">重复密码</td> 
                           	<td data-v-1f84d09f="" colspan="2" style="position: relative;"><input data-v-1f84d09f="" type="password" maxlength="16" tag="确认密码" placeholder="请确认您要设置的密码" class="va75" id="repassword" name="repassword" required="" style="position: relative; z-index: 1; background: rgba(0, 0, 0, 0);" /> <span data-v-10a78dd2="" class="iconfont eye open" data-v-1f84d09f=""></span> <em data-v-ba6aa3ca="" class="clearInput" data-v-1f84d09f="" style="display: none;"></em></td>
                      	</tr> 
                      	<tr data-v-1f84d09f="">
                           	<td data-v-1f84d09f="">验证码</td> 
                           	<td data-v-1f84d09f="" style="position: relative;">
                           		<input data-v-1f84d09f="" type="email" maxlength="4" tag="验证码" placeholder="请输入验证码" autocomplete="off" class="va75" id="imgcode" name="imgcode" required="" style="position: relative; z-index: 1; background: rgba(0, 0, 0, 0);" />
                           		<em data-v-ba6aa3ca="" class="clearInput" data-v-1f84d09f="" style="display: none;"></em>
                       		</td> 
                           	<td data-v-1f84d09f="">
                           		<img src="{U('api/common/secode')}" class="codeImg" style="width: 120px; height: 45px;" onclick="this.src='?m=api&c=common&a=secode&_t='+Math.random()" />
                       		</td>
                      	</tr> 
                      	{if $error}
                      		<tr data-v-6cb1ea77="">
                               	<td data-v-6cb1ea77="" colspan="3">
                               		<font style="font-size: 12px; color: red; padding-left: 20px;">{$error}</font>
                               	</td> 
                          	</tr> 
                          	<tr data-v-6cb1ea77=""></tr>
                      	{/if}
              			<tr data-v-1f84d09f=""></tr>
             		</tbody>
            	</table> 
            </form>
        	<a href="{U('member/login')}" class="tologin fr" data-v-1f84d09f="">已有账号? 立即登录</a> 
        	<div data-v-1f84d09f="" class="loginBtn BTN mt30">
         		<a data-v-1f84d09f="" class="tag_register">立即注册</a>
        	</div>
       	</div>
   	</div> 
    <script>
    $('.tag_register').on('click', '', function (){
    	if(!$('#invitationcode').val()){
    		layer.alert('邀请码不能为空');
    		return;
    	}
    	if(!$('#username').val()){
    		layer.alert('用户名不能为空');
    		return;
    	}
    	if(!$('#password').val()){
    		layer.alert('账户密码不能为空');
    		return;
    	}
    	if(!$('#repassword').val()){
    		layer.alert('确认密码不能为空');
    		return;
    	}
    	if($('#repassword').val() != $('#password').val() ){
    		layer.alert('两次密码不一致');
    		return;
    	}
    	if(!$('#imgcode').val()){
    		layer.alert('邀请码不能为空');
    		return;
    	}
    	$('#registerForm').submit();
    })
    </script>
    {template footer}
</html>